import request from '@/utils/request/index.js'
export default {
	/**
	 * 获取用户信息
	 * @param {Object} userId
	 */
	getUserInfo(userId){
		return request.request({
			url:'/h5/nocuser/getPersonInfo?userId=' + userId,
			method:'get',
			data:{
				
			}
		})
	},
	/**
	 * 获取发布的视频
	 * @param {Object} searchVideo
	 */
	getCreateVideo(searchVideo){
		return request.request({
			url:'/h5/nocvideo/list',
			method:'post',
			data: searchVideo,
			
		})
	},
	/** 关注采购商
	 * @param {Object} userId
	 * @param {Object} shoucangFlag
	 */
	attention(userId,shoucangFlag){
		return request.request({
			url:'/h5/noccloudhome/shoucang',
			method:'post',
			data:{
				userId: userId,
				shoucangFlag: shoucangFlag,
			}
		})
	},
	
	/** 获取视频列表
	 * @param {Object} connectVideo
	 */
	getConnectVideo(connectVideo){
		return request.request({
			url:'/h5/nocvideo/listConnect',
			method:'post',
			data: connectVideo,
			
		})
	},
	/**
	 * 收藏（对自己的动态、视频）
	 */
	toCollect(userId,type,id){
		return request.request({
			url:'/h5/nocyxcollect/save',
			method:'post',
			data:{
				userId: userId,
				type: type,
				businessId: id
			}
		})
	},
	/**
	 * 取消收藏
	 * @param {Object} collectionId
	 */
	cancelLike(collecId){
		return request.request({
			url: '/h5/nocyxcollect/cancelCollection',
			method:'post',
			data:{
				collectionId:collecId
			}
		})
	},



	
	
	
	cancelFollow(collectionId){
		return request.request({
			url:'/h5/nocyxcollect/cancelCollection',
			method: 'post',
			data: {
				collectionId: collectionId,
			}
		})
	},	
}